#include <stdio.h>


int abs(int a){return a>0?a:-a;}
	
int main(){
	int former,newer;
	int res,res_former;
	int dec=1,first=1;
	char c;
	while(scanf("%d%c",&former,&c)!=EOF)
	{
		dec=1;first=1;
		while(c!='\n' && scanf("%d%c",&newer,&c)!=EOF)
		{
			if(first)
			{
				res_former=abs(former-newer);former=newer;
				first=0;
			}
			else{
				res=abs(former-newer); former=newer;
				if(res_former != res+1)
				{
					dec=0;
					while(c!='\n' && getchar()!='\n');// finish reading this line
					break;
				}
				res_former=res;
			}
		}
		printf("%solly\n",dec?"J":"Not j");
	}
	
	getch();
	return 0;
}
